import Cookies from 'js-cookie'

const TokenKey = 'slwl-pc-90'
const ProfileKey = 'slwl-pc-user-90'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function getProfile() {
  return Cookies.get(ProfileKey)
}
/**
 *
 * @param {*} token 身份验证token
 * @returns Cookie 的 set 方法
 */
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function setProfile(userForm) {
  return Cookies.set(ProfileKey, userForm)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function removeProfile() {
  return Cookies.remove(ProfileKey)
}
